package com.kaifamiao.www.demo.Do26;

public class Test01 {
    public static void main(String[] args) {
        Person me = new Person();
        me.name = "坤坤";
        me.gender = '男';
        me.age = 23;
        me.isMarry = false;

        Person obj = new Person();
        obj.name = "黑子";
        obj.gender = '女';
        obj.age = 21;
        obj.isMarry = false;



       if(me.canMarry(obj)){
           System.out.println(me.name + "可以和"+obj.name+"结婚，恭喜");
       }else{
           System.out.println(me.name + "不可以和"+obj.name+"结婚，请注意！");
       }


    }
}
